#!/usr/bin/env python
# -*- coding: UTF-8 -*-




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
import zoo
import zoo

##################################################
## MODULE CONSTANTS
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1380104798.447566
__CHEETAH_genTimestamp__ = 'Wed Sep 25 12:26:38 2013'
__CHEETAH_src__ = 'templates/Skeleton.tmpl'
__CHEETAH_srcLastModified__ = 'Wed Sep 25 12:26:26 2013'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'

if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
    raise AssertionError(
      'This template was compiled with Cheetah version'
      ' %s. Templates compiled before version %s must be recompiled.'%(
         __CHEETAH_version__, RequiredCheetahVersion))

##################################################
## CLASSES

class Skeleton(Template):

    ##################################################
    ## CHEETAH GENERATED METHODS


    def __init__(self, *args, **KWs):

        super(Skeleton, self).__init__(*args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
        

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write(u'''<!DOCTYPE html> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="description" content="''')
        _v = VFN(VFFSL(SL,"zoo",True),"_",False)("MapMint: Professional SDI manager") # u'$zoo._("MapMint: Professional SDI manager")' on line 13, col 35
        if _v is not None: write(_filter(_v, rawExpr=u'$zoo._("MapMint: Professional SDI manager")')) # from line 13, col 35.
        write(u'''">
<meta name="keywords" content="MapMint, SDI, Geospatial, Web GIS, GIS, WPS, WMS, WFS, WCS, ZOO-Project, ZOO, ZOO WPS, MapServer, GDAL, OSGeo, FOSS4G, OGC, OWS">
<meta name="copyright" content="MapMint">
<meta name="author" content="MapMint">
<link rel="shortcut icon" href="''')
        _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 17, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 17, col 33.
        write(u'''/favicon.ico" />
<link rel="alternate" type="application/rss+xml" title="MapMint RSS Feed" href="''')
        _v = VFFSL(SL,"conf",True)["main"]["applicationAddress"] # u'$(conf["main"]["applicationAddress"])' on line 18, col 81
        if _v is not None: write(_filter(_v, rawExpr=u'$(conf["main"]["applicationAddress"])')) # from line 18, col 81.
        write(u'''public/rss" />
<title>''')
        _v = VFFSL(SL,"page_title",True) # u'$page_title' on line 19, col 8
        if _v is not None: write(_filter(_v, rawExpr=u'$page_title')) # from line 19, col 8.
        write(u"""</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css' />
""")
        for f in VFFSL(SL,"ocss",True): # generated from line 21, col 1
            write(u'''<link type="text/css" rel="stylesheet" href="''')
            if VFFSL(SL,"f",True)[0:7]=='http://': # generated from line 22, col 46
                _v = VFFSL(SL,"f",True) # u'$f' on line 22, col 69
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 22, col 69.
            else: # generated from line 22, col 71
                _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 22, col 77
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 22, col 77.
                write(u'''/css/''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 22, col 109
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 22, col 109.
            write(u'''" />
''')
        write(u'''

''')
        for f in VFFSL(SL,"css",True): # generated from line 27, col 1
            write(u'''<link type="text/css" rel="stylesheet" ''')
            if (VFN(VFN(VFFSL(SL,"conf",True),"keys",False)(),"count",False)("senv")>0 and VFN(VFN(VFFSL(SL,"conf",True)["senv"],"keys",False)(),"count",False)("loggedin")>0 and VFFSL(SL,"conf",True)["senv"]["loggedin"]): # generated from line 28, col 40
                write(u'''media="screen"''')
            write(u''' title="''')
            _v = VFFSL(SL,"f",True) # u'$f' on line 28, col 180
            if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 28, col 180.
            write(u'''" href="''')
            if VFFSL(SL,"f",True)[0:7]=='http://': # generated from line 28, col 190
                _v = VFFSL(SL,"f",True) # u'$f' on line 28, col 213
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 28, col 213.
            else: # generated from line 28, col 215
                _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 28, col 221
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 28, col 221.
                write(u'''/css/''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 28, col 253
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 28, col 253.
            write(u'''" id="''')
            _v = VFFSL(SL,"f",True) # u'$f' on line 28, col 269
            if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 28, col 269.
            write(u'''" />
''')
        write(u'''<link type="text/css" rel="stylesheet" href="''')
        _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 30, col 46
        if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 30, col 46.
        write(u'''/new-themes/themes/default/loader.css" /> 
<!--[if IE]>
        <link rel="stylesheet" type="text/css" href="''')
        _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 32, col 54
        if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 32, col 54.
        write(u'''/css/all-ie-only.css" />
<![endif]-->

''')
        if VFN(VFFSL(SL,"conf",True)["main"],"has_key",False)("jsCache") and VFFSL(SL,"conf",True)["main"]["jsCache"]=="prod": # generated from line 35, col 1
            if len(VFFSL(SL,"js",True))>0 and VFFSL(SL,"js",True)[len(VFFSL(SL,"js",True))-1]=="ckeditor.js": # generated from line 36, col 1
                finalJS = VFFSL(SL,"js",True)[len(VFFSL(SL,"js",True))-1]
            else: # generated from line 38, col 1
                finalJS = ""
            ljs = ['flexigrid.js']+VFFSL(SL,"js",True)+['MLayout.js']
            write(u'''<script type="text/javascript" src="''')
            _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 42, col 37
            if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 42, col 37.
            write(u'''/js/''')
            for f in ["jquery-1.7.2.min","jquery-ui-1.8.22.custom.min",'jquery.notifyBar','jquery.easyui.min','jquery.layout-1.3.0']: # generated from line 42, col 68
                _v = VFFSL(SL,"f",True) # u'${f}' on line 42, col 191
                if _v is not None: write(_filter(_v, rawExpr=u'${f}')) # from line 42, col 191.
                write(u'''.js,''')
            write(u'''"></script>

''')
            if len(VFFSL(SL,"ljs",True))>0: # generated from line 44, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 45, col 37
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 45, col 37.
                write(u'''/js/''')
                for f in VFFSL(SL,"ljs",True): # generated from line 45, col 68
                    if VFFSL(SL,"finalJS",True)!=VFFSL(SL,"f",True): # generated from line 45, col 84
                        _v = VFFSL(SL,"f",True) # u'$f' on line 45, col 101
                        if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 45, col 101.
                        write(u''',''')
                write(u'''"></script>
''')
                if VFFSL(SL,"finalJS",True)!="": # generated from line 46, col 1
                    write(u'''<script src="''')
                    _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 47, col 14
                    if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 47, col 14.
                    write(u'''/js/''')
                    _v = VFFSL(SL,"finalJS",True) # u'$finalJS' on line 47, col 45
                    if _v is not None: write(_filter(_v, rawExpr=u'$finalJS')) # from line 47, col 45.
                    write(u'''"></script>
''')
            write(u'''

''')
            for f in VFFSL(SL,"js1",True): # generated from line 52, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"conf",True)['main']['serverAddress'] # u"$conf['main']['serverAddress']" on line 53, col 37
                if _v is not None: write(_filter(_v, rawExpr=u"$conf['main']['serverAddress']")) # from line 53, col 37.
                write(u'''?metaPath=template&request=Execute&service=WPS&version=1.0.0&Identifier=display&DataInputs=tmpl=''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 53, col 163
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 53, col 163.
                write(u''';module=''')
                _v = VFFSL(SL,"mmodule",True) # u'$mmodule' on line 53, col 173
                if _v is not None: write(_filter(_v, rawExpr=u'$mmodule')) # from line 53, col 173.
                write(u'''&RawDataOutput=Result@mimeType=text/plain"></script>
''')
            write(u'''

''')
            for f in VFFSL(SL,"js2",True): # generated from line 58, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 59, col 37
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 59, col 37.
                write(u'''"></script>
''')
            write(u'''

''')
            if len(VFFSL(SL,"js3",True))>0: # generated from line 63, col 1
                for f in VFFSL(SL,"js3",True): # generated from line 64, col 1
                    write(u'''<script type="text/javascript" src="''')
                    _v = VFFSL(SL,"conf",True)["main"]["publicationUrl"] # u'$conf["main"]["publicationUrl"]' on line 65, col 37
                    if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')) # from line 65, col 37.
                    write(u'''/''')
                    _v = VFFSL(SL,"f",True) # u'$f' on line 65, col 69
                    if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 65, col 69.
                    write(u'''"></script>
''')
            write(u'''
''')
        else: # generated from line 69, col 1
            for f in ["jquery-1.7.2.min","jquery-ui-1.8.22.custom.min",'jquery.notifyBar','jquery.easyui.min','jquery.layout-1.3.0']: # generated from line 70, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 71, col 37
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 71, col 37.
                write(u'''/js/''')
                _v = VFFSL(SL,"f",True) # u'${f}' on line 71, col 68
                if _v is not None: write(_filter(_v, rawExpr=u'${f}')) # from line 71, col 68.
                write(u'''.js"></script>
''')
            write(u'''
''')
            ljs = ['flexigrid.js']+VFFSL(SL,"js",True)+['MLayout.js']
            for f in VFFSL(SL,"ljs",True): # generated from line 75, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"conf",True)["main"]["owsAddress"] # u'$conf["main"]["owsAddress"]' on line 76, col 37
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["owsAddress"]')) # from line 76, col 37.
                write(u'''/js/''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 76, col 68
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 76, col 68.
                write(u'''"></script>
''')
            write(u'''
''')
            for f in VFFSL(SL,"js1",True): # generated from line 79, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"conf",True)['main']['serverAddress'] # u"$conf['main']['serverAddress']" on line 80, col 37
                if _v is not None: write(_filter(_v, rawExpr=u"$conf['main']['serverAddress']")) # from line 80, col 37.
                write(u'''?metaPath=template&request=Execute&service=WPS&version=1.0.0&Identifier=display&DataInputs=tmpl=''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 80, col 163
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 80, col 163.
                write(u''';module=''')
                _v = VFFSL(SL,"mmodule",True) # u'$mmodule' on line 80, col 173
                if _v is not None: write(_filter(_v, rawExpr=u'$mmodule')) # from line 80, col 173.
                write(u'''&RawDataOutput=Result@mimeType=text/plain"></script>
''')
            write(u'''

''')
            for f in VFFSL(SL,"js2",True): # generated from line 85, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 86, col 37
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 86, col 37.
                write(u'''"></script>
''')
            write(u'''
''')
            for f in VFFSL(SL,"js3",True): # generated from line 89, col 1
                write(u'''<script type="text/javascript" src="''')
                _v = VFFSL(SL,"conf",True)["main"]["publicationUrl"] # u'$conf["main"]["publicationUrl"]' on line 90, col 37
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["main"]["publicationUrl"]')) # from line 90, col 37.
                write(u'''/''')
                _v = VFFSL(SL,"f",True) # u'$f' on line 90, col 69
                if _v is not None: write(_filter(_v, rawExpr=u'$f')) # from line 90, col 69.
                write(u'''"></script>
''')
            write(u'''
''')
        write(u'''
</head>
<body>

''')
        try: # generated from line 98, col 1
            verr = VFFSL(SL,"errorMsg",True)
        except: # generated from line 100, col 1
            verr = None
        if VFFSL(SL,"mmodule",True)!="public": # generated from line 103, col 1
            write(u'''<div class="loader-container"> 
<div id="loader"> 
</div> 
</div> 

''')
            if (VFN(VFN(VFFSL(SL,"conf",True),"keys",False)(),"count",False)("senv")>0 and VFN(VFN(VFFSL(SL,"conf",True)["senv"],"keys",False)(),"count",False)("loggedin")>0 and VFN(VFN(VFFSL(SL,"conf",True)["senv"],"keys",False)(),"count",False)("lastname")>0 and VFFSL(SL,"conf",True)["senv"]["loggedin"]!="false") and not(VFFSL(SL,"verr",True)): # generated from line 109, col 1
                write(u'''<div class="ui-layout-north">

''')
                t = VFN(VFFSL(SL,"conf",True)["identification"]["title"],"split",False)('-')
                write(u'''<h1 class="ttitle">''')
                _v = VFFSL(SL,"t",True)[0] # u'$t[0]' on line 113, col 20
                if _v is not None: write(_filter(_v, rawExpr=u'$t[0]')) # from line 113, col 20.
                write(u'''<span class="mint"> ''')
                _v = VFFSL(SL,"t",True)[1] # u'$t[1]' on line 113, col 45
                if _v is not None: write(_filter(_v, rawExpr=u'$t[1]')) # from line 113, col 45.
                write(u'''</span></h1>

</div>

<div class="admin">
    <h2 class="ad">''')
                _v = VFFSL(SL,"conf",True)["senv"]["firstname"] # u'$conf["senv"]["firstname"]' on line 118, col 20
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["senv"]["firstname"]')) # from line 118, col 20.
                write(u''' ''')
                _v = VFFSL(SL,"conf",True)["senv"]["lastname"] # u'$conf["senv"]["lastname"]' on line 118, col 47
                if _v is not None: write(_filter(_v, rawExpr=u'$conf["senv"]["lastname"]')) # from line 118, col 47.
                write(u'''</h2>
<ul class="sets">
                <li class="sett"><a href="#" id="users_admin" title="" onclick="System.UserPreferences()">''')
                _v = VFN(VFFSL(SL,"zoo",True),"_",False)("Preferences") # u'$zoo._("Preferences")' on line 120, col 107
                if _v is not None: write(_filter(_v, rawExpr=u'$zoo._("Preferences")')) # from line 120, col 107.
                write(u'''</a></li>
                <li class="user"><a href="#" id="user_management" title="" onclick="System.UserManagement()">''')
                _v = VFN(VFFSL(SL,"zoo",True),"_",False)("Users management") # u'$zoo._("Users management")' on line 121, col 110
                if _v is not None: write(_filter(_v, rawExpr=u'$zoo._("Users management")')) # from line 121, col 110.
                write(u'''</a></li>
                <li class="logt"><a href="#" id="logout" title="">''')
                _v = VFN(VFFSL(SL,"zoo",True),"_",False)("Log out") # u'$zoo._("Log out")' on line 122, col 67
                if _v is not None: write(_filter(_v, rawExpr=u'$zoo._("Log out")')) # from line 122, col 67.
                write(u'''</a></li>
        </ul>
        
</div>

''')
        write(u'''
''')
        _v = VFFSL(SL,"body",True) # u'$body' on line 130, col 1
        if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 130, col 1.
        write(u'''

''')
        if VFFSL(SL,"mmodule",True)!="public" and (VFN(VFN(VFFSL(SL,"conf",True),"keys",False)(),"count",False)("senv")>0 and VFFSL(SL,"conf",True)["senv"]["loggedin"]!="false" and VFN(VFN(VFFSL(SL,"conf",True)["senv"],"keys",False)(),"count",False)("firstname")>0) and not(VFFSL(SL,"verr",True)): # generated from line 132, col 1
            write(u'''<div class="ui-layout-south"> 
  <p class="credits">&copy; copyright <a href="''')
            _v = VFFSL(SL,"conf",True)["provider"]["providerSite"] # u'$conf["provider"]["providerSite"]' on line 134, col 48
            if _v is not None: write(_filter(_v, rawExpr=u'$conf["provider"]["providerSite"]')) # from line 134, col 48.
            write(u'''">''')
            _v = VFFSL(SL,"conf",True)["provider"]["providerName"] # u'$conf["provider"]["providerName"]' on line 134, col 83
            if _v is not None: write(_filter(_v, rawExpr=u'$conf["provider"]["providerName"]')) # from line 134, col 83.
            write(u'''</a></p>
<!--<div class="progress_box_call"></div>-->\t
<div id="progress_bar" class="ui-progress-bar ui-container">
<div class="ui-progress" style="width: 79%;">
  <span class="ui-label" style="display:none;"><b class="value">79%</b></span>
</div>
</div>
''')
        else: # generated from line 141, col 1
            write(u'''<ul class="credits">
<li>&copy; copyright <a href="''')
            _v = VFFSL(SL,"conf",True)["provider"]["providerSite"] # u'$conf["provider"]["providerSite"]' on line 143, col 31
            if _v is not None: write(_filter(_v, rawExpr=u'$conf["provider"]["providerSite"]')) # from line 143, col 31.
            write(u'''">''')
            _v = VFFSL(SL,"conf",True)["provider"]["providerName"] # u'$conf["provider"]["providerName"]' on line 143, col 66
            if _v is not None: write(_filter(_v, rawExpr=u'$conf["provider"]["providerName"]')) # from line 143, col 66.
            write(u'''</a></li>
</ul>
''')
        write(u'''
</div>
</body>
</html>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    js1 = ["main_js"] 

    js3 = [] 

    mmodule = "Distiller"

    css = ["green"]

    js2 =[]

    js2 =[]

    _mainCheetahMethod_for_Skeleton= 'respond'

## END CLASS DEFINITION

if not hasattr(Skeleton, '_initCheetahAttributes'):
    templateAPIClass = getattr(Skeleton, '_CHEETAH_templateClass', Template)
    templateAPIClass._addCheetahPlumbingCodeToClass(Skeleton)


# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/

##################################################
## if run from command line:
if __name__ == '__main__':
    from Cheetah.TemplateCmdLineIface import CmdLineIface
    CmdLineIface(templateObj=Skeleton()).run()


